<template>
    <h3>组件事件</h3>
    <ComponentEventChild @someEvent="getHandle" />
    <p>父元素：{{message}}</p>
</template>

<script>
import ComponentEventChild from "./ComponentEventChild.vue"
export default {
    data() {
        return {
            message: ""
        }
    },
    components: {
        ComponentEventChild
    },
    methods: {
        getHandle(data) {
            console.log("触发了父级函数", data)
            this.message=data;
        }
    }
}
</script>